package com.changhai.diabetes.service;

import org.springframework.transaction.annotation.Transactional;

import com.changhai.diabetes.model.Patient;
import com.changhai.diabetes.model.QueryDTO;
import com.changhai.diabetes.model.page.Page;

public interface PatientService {

	public Page<?> searchQuery(QueryDTO queryDTO);
	
	/**
	 * 根据患者id查找患者信息
	 * @param patientId
	 * @return
	 */
	public Patient searchPatientById(Long patientId);
	
	/**
	 * 保存编辑的患者信息
	 * @param patient
	 */
	public void saveEditPatient(Patient patient);
	
	/**
	 * 新增患者信息
	 * @param patient
	 * @return
	 */
	@Transactional
	public Long saveNewPatient(Patient patient) throws Exception;
	
	/**
	 * 删除患者
	 * @param patientId
	 * @throws Exception
	 */
	@Transactional
	public void delPatient(Long patientId) throws Exception;
}
